/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.account.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.medusa.gruul.common.data.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import java.math.BigDecimal;

/**
 * <p>
 * 会员卡储值信息表
 * </p>
 *
 * @author zhaokw
 * @since 2020-06-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_member_pay_rule")
@ApiModel(value = "MemberPayRule对象", description = "会员卡储值信息表")
public class MemberPayRule extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 会员卡注册状态 0无优惠,1有优惠
     */
    @ApiModelProperty(value = "会员卡注册状态 0无优惠,1有优惠")
    @TableField("state")
    private Integer state;

    /**
     * 优惠金额
     */
    @ApiModelProperty(value = "优惠金额")
    @TableField("discount_amount")
    @DecimalMin(value = "0.01",message = "优惠金额不能低于0.01")
    @DecimalMax(value = "100000000",message = "优惠金额不能大于1个亿")
    private BigDecimal discountAmount;

    /**
     * 充值金额
     */
    @ApiModelProperty(value = "充值金额")
    @TableField("pay_amount")
    @DecimalMin(value = "0.01",message = "充值金额不能低于0.01")
    @DecimalMax(value = "100000000",message = "充值金额不能大于1个亿")
    private BigDecimal payAmount;

}
